package com.woniuxy.mapper;

import com.woniuxy.dto.RecordDTO;
import com.woniuxy.entity.Record;

import java.util.List;

public interface RecordMapper {
    Integer addRecord(Record record);
    List<RecordDTO> queryAll();
    List<RecordDTO> queryByResidentId(Integer residentId);
    List<RecordDTO> queryAllByResidentId(Integer residentId);
    Integer deleteRecord(Integer recordId);
    Integer updateRecord(Record record);

    /**
     * 统计该居民是否曾与该机构签约过
     */
    Integer countByResidentAndOrg(Integer residentId, Integer orgId);

    List<RecordDTO> queryRecordByStatus(Integer status);
}
